<script setup lang="ts">

defineOptions({
  // 售价记录/成本价记录
  name: 'PriceTable'
})

const columns = reactive([
  {
    label: '调价NO',
    prop: 'adjustmentNo',
  },
  {
    label: '项目信息',
    prop: 'projectInfo',
  },
  {
    label: '单位',
    prop: 'unit',
  },
  {
    label: '售价',
    prop: 'price',
  },
  {
    label: '收入项目',
    prop: 'incomeItem',
  },
  {
    label: '执行日期',
    prop: 'effectiveDate',
  },
  {
    label: '终止日期',
    prop: 'endDate',
  },
  {
    label: '说明',
    prop: 'description',
  },
]);

const tableData = reactive([
  {
    adjustmentNo: '001',
    projectInfo: '项目A',
    unit: '个',
    price: '10.00',
    incomeItem: '收入项目A',
    effectiveDate: '2024-04-01',
    endDate: '2024-04-30',
    description: '说明A',
  },
  {
    adjustmentNo: '002',
    projectInfo: '项目B',
    unit: '箱',
    price: '20.00',
    incomeItem: '收入项目B',
    effectiveDate: '2024-05-01',
    endDate: '2024-05-31',
    description: '说明B',
  }
]);

</script>

<template>
  <el-row>
    <el-col :span="24" class="mb10">
      <el-button type="primary" plain>单据预览</el-button>
      <el-button type="primary" plain>单据打印</el-button>
    </el-col>
  </el-row>
  <div class="table-box">
    <sTable
      :columns="columns"
      :tableData="tableData"
      :hasPage="true"
      :page="{
        pageNumber: 1,
        pageSize: 10,
        total: 20,
      }"
    />
  </div>
</template>

<style scoped lang="scss">
.table-box {
  height: calc(100% - 111px);
}
</style>
